package ch.ffhs.ks.ui;

import java.net.URL;

import javax.swing.ImageIcon;

public class ImageFactory {

	public static ImageIcon createImage(String name)
	{
		URL imgURL = ImageFactory.class.getResource(name);
		if (imgURL != null) {
			return new ImageIcon(imgURL);
		} else {
			System.err.println("Couldn't find image in system: " + name);
			return null;
		}
	}

}
